#include "stdio.h"

main()
{
	double in;
	double a,b;
	while (1)
	{
		scanf("%lf",&in);
		if (in<1e-10) break;
		a=0;
		b=2;
		while (a<in)
		{
			a+=1/b;
			b+=1;
		}
		printf("%.0lf card(s)\n",b-2);

	}
	return 0;

}